<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:ui="http://java.sun.com/jsf/facelets">
  <body>
    <ui:composition template="/WEB-INF/templates/main.xhtml">
      <ui:define name="titoloSezione">Autenticazione</ui:define>
      <ui:define name="titoloSottoSezione">Recupero Dati</ui:define>
      
      <ui:define name="corpo">
        <h1>Recupero dati personali</h1>
        
        <h:form>
          <fieldset style="width:300px">
            <legend class="legend">Recupero dati</legend>
            <table class="plainText">
              <tr>
                <td style="width:50%">E-mail:</td>
                <td style="width:50%">
                  <h:inputText id="email" value="#{mainBean.login.email}" validator="#{mainBean.validaEmail}" required="true"/>
                </td>
              </tr>
              <tr>
                <td colspan="2">
                  <h:commandButton value="Recupera Dati" style="width: 100%" action="#{mainBean.login.recuperaDati}"/>
                </td>
              </tr>
              <tr>
                <td colspan="2" style="text-align: center; color: red">
                  <h:message for="email"/>
                </td>
              </tr>
              <tr>
                <td colspan="2" style="text-align: center">
                  <h:outputLink value="/BiPoD/">Torna alla home</h:outputLink>
                </td>
              </tr>
            </table>
          </fieldset>
         </h:form>
      </ui:define>
    </ui:composition>    
  </body>
</html>